#ifndef ICOLLISION_H_
#define ICOLLISION_H_

#include "math/math.h"
#include "../include/collision.h"

namespace physicsworks {

using math::vec3;

class RigidBody;

/**
 * Holds information about collision.
 */
struct Collision {
	RigidBody* b0;
	RigidBody* b1;
	vec3 normal;
	vec3 point0;
	vec3 point1;
	vec3 relativeVelocity;
	real time;
};

/**
 * Tests if two triangles intersect each other.
 */
bool intersectTriangle(const vec3& a0, const vec3& a1, const vec3& a2,
                       const vec3& b0, const vec3& b1, const vec3& b2);

}

#endif /*ICOLLISION_H_*/
